home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / porttool.zip / DATE.MAN < prev    next >
Text File  |  1992-12-03  |  3KB  |  67 lines

  1.  
  2.    NNAAMMEE
  3.       date - display or set system date and time
  4.  
  5.    SSYYNNOOPPSSIISS
  6.       ddaattee [ -h ] [ -u ] [ _m_m_d_d_h_h_m_m[_y_y] ] [ +_f_o_r_m_a_t ]
  7.  
  8.    DDEESSCCRRIIPPTTIIOONN
  9.       If no argument is given, or if the argument begins with +, ddaattee
  10.       displays the current date and time.  Otherwise, the current date
  11.       and time is set.
  12.  
  13.       When setting the date, the first _m_m is the month number; _d_d is the
  14.       day number in the month; _h_h is the hour number (given in the 24
  15.       hour system); the second _m_m is the minute number; _y_y is the last 2
  16.       digits of the year number and is optional.  The current year is the
  17.       default if no year is mentioned.
  18.  
  19.       If the argument begins with ++, the output of ddaattee is under the
  20.       control of the user.  The format for the output is similar to that
  21.       of the first argument to printf(3S).  All output fields are of
  22.       fixed size (zero padded if necessary).  Each field descriptor is
  23.       preceded by %% and will be replaced in the output by its
  24.       corresponding value.  A single %% is displayed with %%%%.  All other
  25.       characters are copied to the output without change.  The string is
  26.       always terminated with a new-line character.
  27.  
  28.       Field Descriptors:
  29.          n  insert a new-line character
  30.          t  insert a tab character
  31.          m  month of year - 01 to 12
  32.          d  day of month - 01 to 31
  33.          y  last 2 digits of year - 00 to 99
  34.          Y  all 4 digits of year
  35.          D  date as mm/dd/yy
  36.          H  hour - 00 to 23
  37.          M  minute - 00 to 59
  38.          S  second - 00 to 59
  39.          T  time as HH:MM:SS
  40.          j  day of year - 001 to 366
  41.          w  day of week - Sunday = 0
  42.          a  abbreviated weekday - Sun to Sat
  43.          h  abbreviated month - Jan to Dec
  44.          r  time in AM/PM notation
  45.          z  current timezone
  46.  
  47.    OOPPTTIIOONNSS
  48.       --hh Display a short help message.
  49.  
  50.       --uu Display the date in GMT (universal time).  This option makes
  51.          sense only if the TZ environment variable is set.
  52.  
  53.    EEXXAAMMPPLLEESS
  54.          date 10090842
  55.  
  56.       Would set the date to October 9, 8:42 AM.
  57.  
  58.       If the year were 1992, and the date was set as above,
  59.          date "+DATE: %m/%d/%y%nTIME: %H:%M:%S"
  60.  
  61.       would generate as output:
  62.  
  63.            DATE: 10/09/92
  64.            TIME: 08:42:00
  65.  
  66.    CCooppyyrriigghhtt  ((cc))  11999922  FFrraannkk  EE..  WWhhaalleeyy  AAllll  rriigghhttss  rreesseerrvveedd
  67.